<template>
	<view style="background: rgba(72, 72, 72, 0.7);min-height: 100vh;">
		<cu-custom :isBack="true" bgColor="bg-white solids-bottom">
			<block slot="content">
				{{banner.title}}
			</block>
		</cu-custom>
		<view class="model-main model">
			<view class="margin-bottom cu-avatar-box">
				<view class="uni-row model-item">
					<view class="margin-bottom-sm">
						<view class="margin-bottom-sm solid-bottom text-xxl">
							<text class="text-bold text-white">{{banner.title}}</text>
						</view>
						<rich-text type="text" :nodes="demoHtml"></rich-text>
					</view>
				</view>
			</view>
		</view>
		<view class="warp30" style="background:none;"></view>
	</view>
</template>

<script>
	var _self;
	var graceRichText = require("../../static/richText.js");
	export default {
		data() {
			return {
				banner:{},
				demoHtml : '',
			};
		},
		components: {
		},
		onLoad:function(event){
			try {
				this.banner = JSON.parse(decodeURIComponent(event.detailDate));
			} catch (error) {
				this.banner = JSON.parse(event.detailDate);
			}
			this.demoHtml = decodeURIComponent(this.banner.html);
			this.demoHtml = '<div style="color:#fff;font-size:14px;">'+this.demoHtml+'</div>';
			this.demoHtml = this.demoHtml.replace(/class="alert alert-danger"/g,'style="display:none;')
			.replace(/<hr>/g,'')
			.replace(/<dl>/g,'<dl style="display:none;">')
			.replace(/class="toc"/g,'style="display:none;"')
			.replace(/class="red"/g,'style="color:color: rgb(255, 0, 0);"')
			.replace(/class="external free"/g,'style="word-wrap: break-word;color:#3b8bff"')
			.replace(/<img/g,'<img style="width:100%;height:auto;margin:8px 0;"')
			.replace(/<h2>/g,'<h2 style="color: #00e0e0;font-size:18px;line-height: 27px;font-weight: normal;">')
			.replace(/<p><br><\/p>/g,'')
			.replace(/padding: 5px 10px;margin: 0px 0px 10px 0px;border: 1px solid #eee;border-left-width: 5px;border-radius: 3px;background: #F9F9F9;/g,"padding: 5px 10px;margin: 0px 0px 10px 0px;border: 1px solid #eee;border-left-width: 5px;border-radius: 3px;background: #F9F9F9;display:none;")
			
			console.info(this.demoHtml);
		},
		methods:{
		}
	}
</script>

<style lang="less">
	
</style>
